package cn.funnyxb.tools.appFrame.util.ui;

import android.app.Activity;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import java.util.Random;

public class UIChanger
{
  private static void _changeViewAtSamePos_alpha(View paramView1, View paramView2)
  {
    _changeViewAtSamePos_alpha(paramView1, paramView2, 1000, 1000);
  }

  private static void _changeViewAtSamePos_alpha(View paramView1, View paramView2, int paramInt1, int paramInt2)
  {
    AlphaAnimation localAlphaAnimation1 = new AlphaAnimation(1.0F, 0.1F);
    localAlphaAnimation1.setDuration(paramInt1);
    paramView2.startAnimation(localAlphaAnimation1);
    paramView2.setVisibility(4);
    AlphaAnimation localAlphaAnimation2 = new AlphaAnimation(0.1F, 1.0F);
    localAlphaAnimation2.setDuration(paramInt2);
    paramView1.startAnimation(localAlphaAnimation2);
    paramView1.setVisibility(0);
  }

  private static void _changeViewAtSamePos_rotate(View paramView1, View paramView2)
  {
    RotateAnimation localRotateAnimation = new RotateAnimation(0.0F, 350.0F, 1, 0.5F, 1, 0.5F);
    localRotateAnimation.setDuration(3000L);
    paramView2.setVisibility(4);
    paramView1.startAnimation(localRotateAnimation);
    paramView1.setVisibility(0);
  }

  private static void _changeViewAtSamePos_scale(View paramView1, View paramView2)
  {
    ScaleAnimation localScaleAnimation1 = new ScaleAnimation(1.0F, 0.0F, 1.0F, 0.0F, 1, 0.5F, 1, 0.5F);
    localScaleAnimation1.setDuration(1000L);
    paramView2.startAnimation(localScaleAnimation1);
    paramView2.setVisibility(4);
    ScaleAnimation localScaleAnimation2 = new ScaleAnimation(0.0F, 1.0F, 0.0F, 1.0F, 1, 0.5F, 1, 0.5F);
    localScaleAnimation2.setDuration(1000L);
    paramView1.startAnimation(localScaleAnimation2);
    paramView1.setVisibility(0);
  }

  private static void _changeViewAtSamePos_translate(Activity paramActivity, View paramView1, View paramView2)
  {
    TranslateAnimation localTranslateAnimation = new TranslateAnimation(paramActivity.getWindowManager().getDefaultDisplay().getWidth(), 0.0F, 0.0F, 0.0F);
    localTranslateAnimation.setDuration(1000L);
    paramView1.startAnimation(localTranslateAnimation);
    paramView2.setVisibility(4);
    paramView1.setVisibility(0);
  }

  public static void changeViewAtSamePos_alpha(View paramView1, View paramView2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      _changeViewAtSamePos_alpha(paramView1, paramView2);
    }
  }

  public static void changeViewAtSamePos_alpha(View paramView1, View paramView2, int paramInt1, int paramInt2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      _changeViewAtSamePos_alpha(paramView1, paramView2, paramInt1, paramInt2);
    }
  }

  public static void changeViewAtSamePos_random(View paramView1, View paramView2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      switch (new Random().nextInt(3))
      {
      default:
        _changeViewAtSamePos_alpha(paramView1, paramView2);
        break;
      case 0:
        _changeViewAtSamePos_alpha(paramView1, paramView2);
        break;
      case 1:
        _changeViewAtSamePos_scale(paramView1, paramView2);
        break;
      case 2:
      }
      _changeViewAtSamePos_rotate(paramView1, paramView2);
    }
  }

  public static void changeViewAtSamePos_rotate(View paramView1, View paramView2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      _changeViewAtSamePos_rotate(paramView1, paramView2);
    }
  }

  public static void changeViewAtSamePos_scale(View paramView1, View paramView2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      _changeViewAtSamePos_scale(paramView1, paramView2);
    }
  }

  public static void changeViewAtSamePos_translate(Activity paramActivity, View paramView1, View paramView2)
  {
    if (!(isNeedChange(paramView1, paramView2)));
    while (true)
    {
      return;
      _changeViewAtSamePos_translate(paramActivity, paramView1, paramView2);
    }
  }

  private static boolean isNeedChange(View paramView1, View paramView2)
  {
    if (paramView1.getVisibility() != 0);
    for (int i = 1; ; i = 0)
      while (true)
      {
        return i;
        if (paramView2.getVisibility() != 0)
          break;
        i = 1;
      }
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.tools.appFrame.util.ui.UIChanger
 * JD-Core Version:    0.5.3
 */